home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / kill.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  505 b   |  27 lines  |  [TEXT/ttxt]

  1. connect (con1, localhost, root,,);
  2. connect (con2, localhost, root,,);
  3.  
  4. #remember id of con1
  5. connection con1;
  6. drop table if exists t1;
  7. create table t1 (kill_id int);
  8. insert into t1 values(connection_id());
  9.  
  10. #kill con1
  11. connection con2;
  12. select ((@id := kill_id) - kill_id) from t1; 
  13. kill @id;
  14.  
  15. # Wait for thread to do.
  16. --sleep 5
  17. # verify that con1 is doning a reconnect
  18. connection con1;
  19. ping
  20. ping
  21. select @id != connection_id();
  22.  
  23. #make sure the server is still alive
  24. connection con2;
  25. select 4;
  26. drop table t1;
  27.